CC=g++
CFLAGS= -Wall -g  -I /usr/local/libevent/include -I /usr/local/zlib/include
LFLAGS= -L /usr/local/libevent/lib -L /usr/local/zlib/lib   -l event  -l z

src=$(wildcard *.cpp)
targets=$(patsubst %.cpp, %, $(src))

all:$(targets)

$(targets):%:%.cpp
	$(CC) $< -o $@ $(CFLAGS) $(LFLAGS)

.PHONY:clean all
clean:
	- rm -rf $(targets) *.o  *.txt out -f